clear 
set more off
cd "/Users/yasenov/Dropbox/mariel_boatlift/jhr_version/jhr_figures"
global folder /Users/yasenov/Dropbox/mariel_boatlift/revision_version/revision_data/
set scheme s1color

* H - hispanic, NH - non-hispanic
* M - male; F - female
* P - prime age; M - marginal age

*** 1. H, M, P, March CPS 
use $folder/aux_march.dta, clear
keep if age >= 19
replace year = year - 1

keep if age >= 25 & age <= 59
keep if hispan != 300 & hisp == 1
keep if male == 1

keep if low_skilled == 1 & labforce == 2 & logwage > 0 & metarea == 5000 & (year>=1972 & year<=1991)
drop if classwly == 10 | classwly == 13 | classwly == 14 
keep if logwage > 0

count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) logwage [pw=wtsupp], by(year)
gen h_m_p_size = samplesize
rename logwage h_m_p
tempfile h_m_p 
save `h_m_p'
/*			*/

*** 2. H, M, M, March CPS 
use $folder/aux_march.dta, clear
keep if age >= 19
replace year = year - 1

keep if age <= 25 | age >= 59
keep if hispan != 300 & hisp == 1
keep if male == 1

keep if low_skilled == 1 & labforce == 2 & logwage > 0 & metarea == 5000 & (year>=1972 & year<=1991)
drop if classwly == 10 | classwly == 13 | classwly == 14 
keep if logwage > 0

count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) logwage [pw=wtsupp], by(year)
gen h_m_m_size = samplesize
rename logwage h_m_m
tempfile h_m_m 
save `h_m_m'
/*			*/

*** 3. H, M, MP, March CPS 
use $folder/aux_march.dta, clear
keep if age >= 19
replace year = year - 1

keep if age >= 19 & age <= 65
keep if hispan != 300 & hisp == 1
keep if male == 1

keep if low_skilled == 1 & labforce == 2 & logwage > 0 & metarea == 5000 & (year>=1972 & year<=1991)
drop if classwly == 10 | classwly == 13 | classwly == 14 
keep if logwage > 0

count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) logwage [pw=wtsupp], by(year)
gen h_m_mp_size = samplesize
rename logwage h_m_mp
tempfile h_m_mp 
save `h_m_mp'
/*			*/

*** 4. H, F, P, March CPS 
use $folder/aux_march.dta, clear
keep if age >= 19
replace year = year - 1

keep if age >= 25 & age <= 59
keep if hispan != 300 & hisp == 1
keep if male == 0

keep if low_skilled == 1 & labforce == 2 & logwage > 0 & metarea == 5000 & (year>=1972 & year<=1991)
drop if classwly == 10 | classwly == 13 | classwly == 14 
keep if logwage > 0

count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) logwage [pw=wtsupp], by(year)
gen h_f_p_size = samplesize
rename logwage h_f_p
tempfile h_f_p 
save `h_f_p'
/*			*/

*** 5. H, F, M, March CPS 
use $folder/aux_march.dta, clear
keep if age >= 19
replace year = year - 1

keep if age <= 25 | age >= 59
keep if hispan != 300 & hisp == 1
keep if male == 0

keep if low_skilled == 1 & labforce == 2 & logwage > 0 & metarea == 5000 & (year>=1972 & year<=1991)
drop if classwly == 10 | classwly == 13 | classwly == 14 
keep if logwage > 0

count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) logwage [pw=wtsupp], by(year)
gen h_f_m_size = samplesize
rename logwage h_f_m
tempfile h_f_m
save `h_f_m'
/*			*/

*** 6. H, F, MP, March CPS 
use $folder/aux_march.dta, clear
keep if age >= 19
replace year = year - 1

keep if age >= 19 & age <= 65
keep if hispan != 300 & hisp == 1
keep if male == 0

keep if low_skilled == 1 & labforce == 2 & logwage > 0 & metarea == 5000 & (year>=1972 & year<=1991)
drop if classwly == 10 | classwly == 13 | classwly == 14 
keep if logwage > 0

count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) logwage [pw=wtsupp], by(year)
gen h_f_mp_size = samplesize
rename logwage h_f_mp
tempfile h_f_mp
save `h_f_mp'
/*			*/

*** 7. H, FM, P, March CPS 
use $folder/aux_march.dta, clear
keep if age >= 19
replace year = year - 1

keep if age >= 25 & age <= 59
keep if hispan != 300 & hisp == 1
keep if male == 1 | male == 0

keep if low_skilled == 1 & labforce == 2 & logwage > 0 & metarea == 5000 & (year>=1972 & year<=1991)
drop if classwly == 10 | classwly == 13 | classwly == 14 
keep if logwage > 0

count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) logwage [pw=wtsupp], by(year)
gen h_fm_p_size = samplesize
rename logwage h_fm_p
tempfile h_fm_p 
save `h_fm_p'
/*			*/

*** 8. H, FM, M, March CPS 
use $folder/aux_march.dta, clear
keep if age >= 19
replace year = year - 1

keep if age <= 25 | age >= 59
keep if hispan != 300 & hisp == 1
keep if male == 1 | male == 0

keep if low_skilled == 1 & labforce == 2 & logwage > 0 & metarea == 5000 & (year>=1972 & year<=1991)
drop if classwly == 10 | classwly == 13 | classwly == 14 
keep if logwage > 0

count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) logwage [pw=wtsupp], by(year)
gen h_fm_m_size = samplesize
rename logwage h_fm_m
tempfile h_fm_m 
save `h_fm_m'
/*			*/

*** 9. H, FM, MP, March CPS 
use $folder/aux_march.dta, clear
keep if age >= 19
replace year = year - 1

keep if age >= 19 & age <= 65
keep if hispan != 300 & hisp == 1
keep if male == 0 | male == 1

keep if low_skilled == 1 & labforce == 2 & logwage > 0 & metarea == 5000 & (year>=1972 & year<=1991)
drop if classwly == 10 | classwly == 13 | classwly == 14 
keep if logwage > 0

count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) logwage [pw=wtsupp], by(year)
gen h_fm_mp_size = samplesize
rename logwage h_fm_mp
tempfile h_fm_mp
save `h_fm_mp'
/*			*/

*** 10. NH, M, P, March CPS 
use $folder/aux_march.dta, clear
keep if age >= 19
replace year = year - 1

keep if age >= 25 & age <= 59
keep if hisp == 0
keep if male == 1

keep if low_skilled == 1 & labforce == 2 & logwage > 0 & metarea == 5000 & (year>=1972 & year<=1991)
drop if classwly == 10 | classwly == 13 | classwly == 14 
keep if logwage > 0

count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) logwage [pw=wtsupp], by(year)
gen nh_m_p_size = samplesize
rename logwage nh_m_p
tempfile nh_m_p 
save `nh_m_p'
/*			*/

*** 11. NH, M, M, March CPS 
use $folder/aux_march.dta, clear
keep if age >= 19
replace year = year - 1

keep if age <= 25 | age >= 59
keep if hisp == 0
keep if male == 1

keep if low_skilled == 1 & labforce == 2 & logwage > 0 & metarea == 5000 & (year>=1972 & year<=1991)
drop if classwly == 10 | classwly == 13 | classwly == 14 
keep if logwage > 0

count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) logwage [pw=wtsupp], by(year)
gen nh_m_m_size = samplesize
rename logwage nh_m_m
tempfile nh_m_m 
save `nh_m_m'
/*			*/

*** 12. NH, M, MP, March CPS 
use $folder/aux_march.dta, clear
keep if age >= 19
replace year = year - 1

keep if age >= 19 & age <= 65
keep if hisp == 0
keep if male == 1

keep if low_skilled == 1 & labforce == 2 & logwage > 0 & metarea == 5000 & (year>=1972 & year<=1991)
drop if classwly == 10 | classwly == 13 | classwly == 14 
keep if logwage > 0

count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) logwage [pw=wtsupp], by(year)
gen nh_m_mp_size = samplesize
rename logwage nh_m_mp
tempfile nh_m_mp 
save `nh_m_mp'
/*			*/

*** 13. NH, F, P, March CPS 
use $folder/aux_march.dta, clear
keep if age >= 19
replace year = year - 1

keep if age >= 25 & age <= 59
keep if hisp == 0
keep if male == 0

keep if low_skilled == 1 & labforce == 2 & logwage > 0 & metarea == 5000 & (year>=1972 & year<=1991)
drop if classwly == 10 | classwly == 13 | classwly == 14 
keep if logwage > 0

count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) logwage [pw=wtsupp], by(year)
gen nh_f_p_size = samplesize
rename logwage nh_f_p
tempfile nh_f_p 
save `nh_f_p'
/*			*/

*** 14. NH, F, M, March CPS 
use $folder/aux_march.dta, clear
keep if age >= 19
replace year = year - 1

keep if age <= 25 | age >= 59
keep if hisp == 0
keep if male == 0

keep if low_skilled == 1 & labforce == 2 & logwage > 0 & metarea == 5000 & (year>=1972 & year<=1991)
drop if classwly == 10 | classwly == 13 | classwly == 14 
keep if logwage > 0

count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) logwage [pw=wtsupp], by(year)
gen nh_f_m_size = samplesize
rename logwage nh_f_m
tempfile nh_f_m
save `nh_f_m'
/*			*/

*** 15. NH, F, MP, March CPS 
use $folder/aux_march.dta, clear
keep if age >= 19
replace year = year - 1

keep if age >= 19 & age <= 65
keep if hisp == 0
keep if male == 0

keep if low_skilled == 1 & labforce == 2 & logwage > 0 & metarea == 5000 & (year>=1972 & year<=1991)
drop if classwly == 10 | classwly == 13 | classwly == 14 
keep if logwage > 0

count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) logwage [pw=wtsupp], by(year)
gen nh_f_mp_size = samplesize
rename logwage nh_f_mp
tempfile nh_f_mp
save `nh_f_mp'
/*			*/

*** 16. NH, FM, P, March CPS 
use $folder/aux_march.dta, clear
keep if age >= 19
replace year = year - 1

keep if age >= 25 & age <= 59
keep if hisp == 0
keep if male == 1 | male == 0

keep if low_skilled == 1 & labforce == 2 & logwage > 0 & metarea == 5000 & (year>=1972 & year<=1991)
drop if classwly == 10 | classwly == 13 | classwly == 14 
keep if logwage > 0

count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) logwage [pw=wtsupp], by(year)
gen nh_fm_p_size = samplesize
rename logwage nh_fm_p
tempfile nh_fm_p 
save `nh_fm_p'
/*			*/

*** 17. NH, FM, M, March CPS 
use $folder/aux_march.dta, clear
keep if age >= 19
replace year = year - 1

keep if age <= 25 | age >= 59
keep if hisp == 0
keep if male == 1 | male == 0

keep if low_skilled == 1 & labforce == 2 & logwage > 0 & metarea == 5000 & (year>=1972 & year<=1991)
drop if classwly == 10 | classwly == 13 | classwly == 14 
keep if logwage > 0

count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) logwage [pw=wtsupp], by(year)
gen nh_fm_m_size = samplesize
rename logwage nh_fm_m
tempfile nh_fm_m 
save `nh_fm_m'
/*			*/

*** 18. NH, FM, MP, March CPS 
use $folder/aux_march.dta, clear
keep if age >= 19
replace year = year - 1

keep if age >= 19 & age <= 65
keep if hisp == 0
keep if male == 0 | male == 1

keep if low_skilled == 1 & labforce == 2 & logwage > 0 & metarea == 5000 & (year>=1972 & year<=1991)
drop if classwly == 10 | classwly == 13 | classwly == 14 
keep if logwage > 0

count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) logwage [pw=wtsupp], by(year)
gen nh_fm_mp_size = samplesize
rename logwage nh_fm_mp
tempfile nh_fm_mp
save `nh_fm_mp'
/*			*/

*** 19. HNH M, P, March CPS 
use $folder/aux_march.dta, clear
keep if age >= 19
replace year = year - 1

keep if age >= 25 & age <= 59
keep if hispan != 300
keep if male == 1

keep if low_skilled == 1 & labforce == 2 & logwage > 0 & metarea == 5000 & (year>=1972 & year<=1991)
drop if classwly == 10 | classwly == 13 | classwly == 14 
keep if logwage > 0

count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) logwage [pw=wtsupp], by(year)
gen hnh_m_p_size = samplesize
rename logwage hnh_m_p
tempfile hnh_m_p 
save `hnh_m_p'
/*			*/

*** 20. HNH M, M, March CPS 
use $folder/aux_march.dta, clear
keep if age >= 19
replace year = year - 1

keep if age <= 25 | age >= 59
keep if hispan != 300
keep if male == 1

keep if low_skilled == 1 & labforce == 2 & logwage > 0 & metarea == 5000 & (year>=1972 & year<=1991)
drop if classwly == 10 | classwly == 13 | classwly == 14 
keep if logwage > 0

count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) logwage [pw=wtsupp], by(year)
gen hnh_m_m_size = samplesize
rename logwage hnh_m_m
tempfile hnh_m_m 
save `hnh_m_m'
/*			*/

*** 21. HNH M, MP, March CPS 
use $folder/aux_march.dta, clear
keep if age >= 19
replace year = year - 1

keep if age >= 19 & age <= 65
keep if hispan != 300
keep if male == 1

keep if low_skilled == 1 & labforce == 2 & logwage > 0 & metarea == 5000 & (year>=1972 & year<=1991)
drop if classwly == 10 | classwly == 13 | classwly == 14 
keep if logwage > 0

count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) logwage [pw=wtsupp], by(year)
gen hnh_m_mp_size = samplesize
rename logwage hnh_m_mp
tempfile hnh_m_mp 
save `hnh_m_mp'
/*			*/

*** 22. HNH F, P, March CPS 
use $folder/aux_march.dta, clear
keep if age >= 19
replace year = year - 1

keep if age >= 25 & age <= 59
keep if hispan != 300
keep if male == 0

keep if low_skilled == 1 & labforce == 2 & logwage > 0 & metarea == 5000 & (year>=1972 & year<=1991)
drop if classwly == 10 | classwly == 13 | classwly == 14 
keep if logwage > 0

count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) logwage [pw=wtsupp], by(year)
gen hnh_f_p_size = samplesize
rename logwage hnh_f_p
tempfile hnh_f_p 
save `hnh_f_p'
/*			*/

*** 23. HNH F, M, March CPS 
use $folder/aux_march.dta, clear
keep if age >= 19
replace year = year - 1

keep if age <= 25 | age >= 59
keep if hispan != 300
keep if male == 0

keep if low_skilled == 1 & labforce == 2 & logwage > 0 & metarea == 5000 & (year>=1972 & year<=1991)
drop if classwly == 10 | classwly == 13 | classwly == 14 
keep if logwage > 0

count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) logwage [pw=wtsupp], by(year)
gen hnh_f_m_size = samplesize
rename logwage hnh_f_m
tempfile hnh_f_m
save `hnh_f_m'
/*			*/

*** 24. HNH F, MP, March CPS 
use $folder/aux_march.dta, clear
keep if age >= 19
replace year = year - 1

keep if age >= 19 & age <= 65
keep if hispan != 300
keep if male == 0

keep if low_skilled == 1 & labforce == 2 & logwage > 0 & metarea == 5000 & (year>=1972 & year<=1991)
drop if classwly == 10 | classwly == 13 | classwly == 14 
keep if logwage > 0

count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) logwage [pw=wtsupp], by(year)
gen hnh_f_mp_size = samplesize
rename logwage hnh_f_mp
tempfile hnh_f_mp
save `hnh_f_mp'
/*			*/

*** 25. HNH FM, P, March CPS 
use $folder/aux_march.dta, clear
keep if age >= 19
replace year = year - 1

keep if age >= 25 & age <= 59
keep if hispan != 300
keep if male == 1 | male == 0

keep if low_skilled == 1 & labforce == 2 & logwage > 0 & metarea == 5000 & (year>=1972 & year<=1991)
drop if classwly == 10 | classwly == 13 | classwly == 14 
keep if logwage > 0

count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) logwage [pw=wtsupp], by(year)
gen hnh_fm_p_size = samplesize
rename logwage hnh_fm_p
tempfile hnh_fm_p 
save `hnh_fm_p'
/*			*/

*** 26. HNH FM, M, March CPS 
use $folder/aux_march.dta, clear
keep if age >= 19
replace year = year - 1

keep if age <= 25 | age >= 59
keep if hispan != 300
keep if male == 1 | male == 0

keep if low_skilled == 1 & labforce == 2 & logwage > 0 & metarea == 5000 & (year>=1972 & year<=1991)
drop if classwly == 10 | classwly == 13 | classwly == 14 
keep if logwage > 0

count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) logwage [pw=wtsupp], by(year)
gen hnh_fm_m_size = samplesize
rename logwage hnh_fm_m
tempfile hnh_fm_m 
save `hnh_fm_m'
/*			*/

*** 27. HNH FM, MP, March CPS 
use $folder/aux_march.dta, clear
keep if age >= 19
replace year = year - 1

keep if age >= 19 & age <= 65
keep if hispan != 300
keep if male == 0 | male == 1

keep if low_skilled == 1 & labforce == 2 & logwage > 0 & metarea == 5000 & (year>=1972 & year<=1991)
drop if classwly == 10 | classwly == 13 | classwly == 14 
keep if logwage > 0

count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) logwage [pw=wtsupp], by(year)
gen hnh_fm_mp_size = samplesize
rename logwage hnh_fm_mp
tempfile hnh_fm_mp
save `hnh_fm_mp'
/*			*/

*********************
*********************
*********************
*********************
clear
use `h_m_p'
merge 1:1 year using `h_m_m', nogen
merge 1:1 year using `h_m_mp', nogen
merge 1:1 year using `h_f_m', nogen
merge 1:1 year using `h_f_p', nogen
merge 1:1 year using `h_f_mp', nogen
merge 1:1 year using `h_fm_m', nogen
merge 1:1 year using `h_fm_p', nogen
merge 1:1 year using `h_fm_mp', nogen
merge 1:1 year using `nh_m_p', nogen
merge 1:1 year using `nh_m_m', nogen
merge 1:1 year using `nh_m_mp', nogen
merge 1:1 year using `nh_f_m', nogen
merge 1:1 year using `nh_f_p', nogen
merge 1:1 year using `nh_f_mp', nogen
merge 1:1 year using `nh_fm_m', nogen
merge 1:1 year using `nh_fm_p', nogen
merge 1:1 year using `nh_fm_mp', nogen
merge 1:1 year using `hnh_m_p', nogen
merge 1:1 year using `hnh_m_m', nogen
merge 1:1 year using `hnh_m_mp', nogen
merge 1:1 year using `hnh_f_m', nogen
merge 1:1 year using `hnh_f_p', nogen
merge 1:1 year using `hnh_f_mp', nogen
merge 1:1 year using `hnh_fm_m', nogen
merge 1:1 year using `hnh_fm_p', nogen
merge 1:1 year using `hnh_fm_mp', nogen

*********************
**** GRAPHING *****
*********************
local names h_m_m h_m_mp h_f_m h_f_p h_f_mp h_fm_p h_fm_m h_fm_mp ///
	nh_m_p nh_m_m nh_m_mp nh_f_m nh_f_p nh_f_mp nh_fm_p nh_fm_m nh_fm_mp ///
	hnh_m_p hnh_m_m hnh_m_mp hnh_f_m hnh_f_p hnh_f_mp hnh_fm_p hnh_fm_m hnh_fm_mp

foreach i of local names {
		scalar a`i' = `i'[8] - h_m_p[8] 
		replace `i' = `i' - a`i'
		replace `i' = 4.6 if `i' < 4.6     // note !!!!
		replace `i' = 5.8 if `i' > 5.8    // note !!!!
		}

/* calculate the slope */
gen trend = .
replace trend = hnh_fm_mp if year == 1972
replace trend = hnh_fm_mp if year == 1979
qui sum trend if year == 1972
scalar a = r(mean)
qui sum trend if year == 1979
scalar b = r(mean)
scalar slope = (a-b)/(1972-1979)
replace trend = trend[8] + slope* 11 if year == 1990

label var nh_m_p "Borjas"
label var trend "Trend"
label var hnh_fm_mp "Ours"
label var h_m_m "0-20 Obs"
label var hnh_fm_p "40+ Obs"
label var h_fm_p "20-40 Obs"

twoway ///
	(line h_m_m year if h_m_m>=4.6 & h_m_m<=5.8, lcolor(gs15)) (line h_m_p year if h_m_p>=4.6 & h_m_p<=5.8, lcolor(gs15)) ///
	(line h_m_mp year if h_m_mp>=4.6 & h_m_mp<=5.8, lcolor(gs15)) (line h_f_m year if h_f_m>=4.6 & h_f_m<=5.8, lcolor(gs15)) ///
	(line h_f_p year if h_f_p>=4.6 & h_f_p<=5.8, lcolor(gs15)) (line h_f_mp year if h_f_mp>=4.6 & h_f_mp<=5.8, lcolor(gs15)) ///
	(line h_fm_m year if h_fm_m>=4.6 & h_fm_m<=5.8, lcolor(gs15)) (line h_fm_p year if h_fm_p>=4.6 & h_fm_p<=5.8, lcolor(gs10)) ///
	(line h_fm_mp year if h_fm_mp>=4.6 & h_fm_mp<=5.8, lcolor(gs15)) ///
	(line nh_m_m year if nh_m_m>=4.6 & nh_m_m<=5.8, lcolor(gs15)) (line nh_m_p year if nh_m_p>=4.6 & nh_m_p<=5.8, lcolor(black) lwidth(thick) lpattern(dash)) ///
	(line nh_m_mp year if nh_m_mp>=4.6 & nh_m_mp<=5.8, lcolor(gs10)) (line nh_f_m year if nh_f_m>=4.6 & nh_f_m<=5.8, lcolor(gs15)) ///
	(line nh_f_p year if nh_f_p>=4.6 & nh_f_p<=5.8, lcolor(gs15)) (line nh_f_mp year if nh_f_mp>=4.6 & nh_f_mp<=5.8, lcolor(gs15)) ///
	(line nh_fm_m year if nh_fm_m>=4.6 & nh_fm_m<=5.8, lcolor(gs15)) (line nh_fm_p year if nh_fm_p>=4.6 & nh_fm_p<=5.8, lcolor(gs10)) ///
	(line nh_fm_mp year if nh_fm_mp>=4.6 & nh_fm_mp<=5.8, lcolor(gs10)) ///
	(line hnh_m_m year if hnh_m_m>=4.6 & hnh_m_m<=5.8, lcolor(gs15)) (line hnh_m_p year if hnh_m_p>=4.6 & hnh_m_p<=5.8, lcolor(gs10)) ///
	(line hnh_m_mp year if hnh_m_mp>=4.6 & hnh_m_mp<=5.8, lcolor(gs10)) (line hnh_f_m year if hnh_f_m>=4.6 & hnh_f_m<=5.8, lcolor(gs15)) ///
	(line hnh_f_p year if hnh_f_p>=4.6 & hnh_f_p<=5.8, lcolor(gs10)) (line hnh_f_mp year if hnh_f_mp>=4.6 & hnh_f_mp<=5.8, lcolor(gs10)) ///
	(line hnh_fm_m year if hnh_fm_m>=4.6 & hnh_fm_m<=5.8, lcolor(gs15)) (line hnh_fm_p year if hnh_fm_p>=4.6 & hnh_fm_p<=5.8, lcolor(gs3)) ///
	(line hnh_fm_mp year if hnh_fm_mp>=4.6 & hnh_fm_mp<=5.8, lcolor(black) lwidth(thick)) ///
	(line trend year, lcolor(black) lwidth(thick) lpattern(shortdash_dot)) ///
	, ///
	xlabel(1973 "1973" 1975 "75" 1977 "77" 1979 `""79" "Pre""' 1981 `""81" "Post""' 1983 "83" 1985 "85" 1987 "87" 1989 "89" 1991 "91") ///
	xline(1979, lcolor(black) lpattern(dash)) subtitle("Log Weekly Wages in Miami, Subsamples, March CPS") ///
	ytitle("") xtitle("")  plotregion(lwidth(none)) ///
	yscale(range(4.6 5.8) noextend) ylabel(4.6(.3)5.8) ///
	text(5.8 1990.8 "Panel B") ///
	legend(on order(11 27 28 1 8 26) r(1) col(6) colgap(medsmall) size(small) symxsize(vlarge) symysize(small) bmargin(tiny) region(margin(zero)))
	
graph copy two, replace

/*********************
**** SAMPLE SIZES *****
*********************
local vars nh_m_p_size nh_m_mp_size nh_m_m_size nh_fm_p_size nh_fm_mp_size nh_fm_m_size nh_f_p_size ///
	nh_f_mp_size nh_f_m_size hnh_m_p_size hnh_m_mp_size hnh_m_m_size hnh_fm_p_size hnh_fm_mp_size ///
	hnh_fm_m_size hnh_f_p_size hnh_f_mp_size hnh_f_m_size h_m_p_size h_m_mp_size h_m_m_size ///
	h_fm_p_size h_fm_mp_size h_fm_m_size h_f_p_size h_f_mp_size h_f_m_size
	
collapse `vars'

export excel matrix27_n_march, firstrow(variables)
